#include <iostream>
#include <string> // for string
#include <vector> // for vector
#include <queue> // queue 

using namespace std;

struct NodeInfo {
    int ParentId;
    string Name;
};

struct Node {
    string data;
    vector<Node*> children;
    
    Node(const string& data_) : data(data_) {}
};

class Solution {
public:
    void Delete(int TargetID, vector<NodeInfo>& NodeList) {
        if (TargetID < 0 || TargetID >= (int)NodeList.size()) {
            cerr << "ERROR: TargetID is invalid" << endl;
        }
    }

private:
    Node* build_tree(const vector<NodeInfo>& NodeList) {
        queue<int> q;
        if (NodeList.size() > 1) q.push(1);
        while (!q.empty()) {
            int qSize = q.size();
            for (int i = 0; i < qSize; ++i) {
                int node = q.front();
                q.pop();

            }
        }
        for (int i = 2; i <= (int)NodeList.size(); ++i) {
            Node* root = new Node(NodeList[node].Name);
            if (NodeList[i].ParentId == node) {
                q.push(i);
                root->children.push_back(new Node(NodeList[i].Name));
            }
        }
        return root;
    }

};

void test() {
    // 模拟从数据库读取完成并加载到内存，并存储在变量NodeList中
    vector<NodeInfo> NodeList = {
        {0, ""},
        {-1,"A"},
        {1,"B"},
        {1,"C"},
        {2,"D"},
        {2,"E"},
        {3,"F"},
        {3,"G"},
        {4,"H"},
    };

    Solution s;
    s.Delete(3, NodeList);
}

int main(void)
{
    test();
    return 0;
}

